package me.chanjar.weixin.cp.bean;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.bean.kf.WxCpKfCustomerBatchGetResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * @author wilson.liu
 * @date : 2025-04-03 10:51
 */
@Data
public class WxCpTpUseridToOpenUseridResult extends WxCpBaseResp {

  @SerializedName("open_userid_list")
  private List<OpenUserId> openUseridList;

  @SerializedName("invalid_userid_list")
  private List<String> invalidUseridList;


  @Data
  public static class OpenUserId implements Serializable {

    @SerializedName("userid")
    private String userid;

    @SerializedName("open_userid")
    private String openUserid;
  }

  public static WxCpTpUseridToOpenUseridResult fromJson(String json) {
    return WxCpGsonBuilder.create().fromJson(json, WxCpTpUseridToOpenUseridResult.class);
  }
}
